package com.synergy.stockflow.sales.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.synergy.stockflow.sales.entity.Quotation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

@Mapper
public interface QuotationMapper extends BaseMapper<Quotation> {
    List<Quotation> getQuotation(Page<Quotation> page,
                                 @Param("quotationId") String quotationId,
                                 @Param("quotaitionDateOfSigning") String quotaitionDateOfSigning,
                                 @Param("beginquotationSalesActually") Double beginquotationSalesActually,
                                 @Param("quotationHeadOfSales") String quotationHeadOfSales,
                                 @Param("endquotationSalesActually") Double endquotationSalesActually,
                                 @Param("customerResourcesName") String customerResourcesName,
                                 @Param("warehouseId") String warehouseId);

    int update(String quotationId);

    List<Quotation> selectWhere(Page<Quotation> page, @Param("quotationState") String quotationState);

    int updateQuotationState(@Param("quotationId")String quotationId, @Param("quotationState")String quotationState);
}